from vector import *
mCh = []
class mapChanger:
    def __init__(self,pos,mapzor,player,newMap):
        self.map = mapzor
        self.mapName = newMap
        self.player = player
        self.pos = vector(int(pos.get()[0])*10,int(pos.get()[1])*10)
        mCh.append(self)
    def think(self):
        self.pos.get()
        if self.player.getPos() == self.pos.get():
            self.map.changeMap(self.mapName)
    def __del__(self):
        for i in mapChangers:
            if i == self:
                mCh.pop(i)
                print done
        
